using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Deepcode.Flux.Core.Data;

namespace Deepcode.Flux.Core.Systems.Security
{
	/// <summary>
	/// Represents a single administration group permission record in the database.
	/// </summary>
	public class AdminGroupPermission
	{
		// Private fields to store data
		private int _PK_ID = -1;
		private int _FK_Group = -1;
		private string _Permission = "";
		// Public property accessors
		public int PK_ID { get { return _PK_ID; } set { _PK_ID = value; } }
		public int FK_Group { get { return _FK_Group; } set { _FK_Group = value; } }
		public string Permission { get { return _Permission; } set { _Permission = value; } }

		// Default Constructor
		public AdminGroupPermission() { }
		// Constructor to load data from data row
		public AdminGroupPermission(DataRow LoadFromRow)
		{
			_PK_ID = SQLUtility.DBNull(LoadFromRow["PK_ID"], -1);
			_FK_Group = SQLUtility.DBNull(LoadFromRow["FK_Group"], -1);
			_Permission = SQLUtility.DBNull(LoadFromRow["Permission"], "");
		}
	}
}